﻿<StackPanel x:Class="CustomerEAddresses"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:my="clr-namespace:Biller"
             xmlns:fc="clr-namespace:FuncClasses;assembly=FuncClasses"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="500" MaxWidth="500" Margin="0,7,0,0" VerticalAlignment="Center" HorizontalAlignment="Left">
    <StackPanel.Resources>
        <ResourceDictionary>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
            <my:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
            <my:ValueConverterGroup x:Key="InvertAndVisibilitate">
                <my:InverseBooleanConverter/>
                <BooleanToVisibilityConverter/>
            </my:ValueConverterGroup>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary  x:Name="LocalizationStrings" Source="../../Localization/MainWindowStrings-de.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </StackPanel.Resources>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="Adressbezeichnung:" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" Name="CustomerDataAddressDescr" VerticalAlignment="Center" Width="250" Margin="7,0,0,0" BorderBrush="#FF9A9C9E" Text="{Binding AddressDescription}"/>
        <Image Width="23" Height="23" Margin="20,0,0,0" Name="Image1" Cursor="Hand" Source="../../Images/remove.png"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel},AncestorLevel=2}, Path=DataContext.IsCompany, Converter={StaticResource BooleanToVisibilityConverter}}">
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource companyname}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" VerticalAlignment="Center" Width="250" Margin="7,0,0,0" BorderBrush="#FF9A9C9E" Text="{Binding Address.CompanyName}"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel},AncestorLevel=2}, Path=DataContext.IsCompany, Converter={StaticResource InvertAndVisibilitate}}">
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource addresscustomer}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" Name="CustomerDataSalutationTB" VerticalAlignment="Center" Width="250" Margin="7,0,0,0" BorderBrush="#FF9A9C9E" Text="{Binding Salutation}"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel},AncestorLevel=2}, Path=DataContext.IsCompany, Converter={StaticResource InvertAndVisibilitate}}">
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource title}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" Margin="7,0,0,0" Name="TextBox14" VerticalAlignment="Center" Width="250" BorderBrush="#FF9A9C9E" Text="{Binding Title}"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource namesurname}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="7,0,0,0" Name="TextBox17" VerticalAlignment="Center" Width="122" BorderBrush="#FF9A9C9E" Text="{Binding Forname}"/>
        <TextBox Height="23" Margin="6,0,0,0" Name="TextBox18" VerticalAlignment="Center" Width="122" BorderBrush="#FF9A9C9E" Text="{Binding Surname}"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource addition}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" Margin="7,0,0,0" Name="TextBox16" VerticalAlignment="Center" Width="250" BorderBrush="#FF9A9C9E" Text="{Binding Addition}"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource street}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" Margin="7,0,0,0" Name="TextBox12" VerticalAlignment="Center" Width="163" BorderBrush="#FF9A9C9E" Text="{Binding Street}"/>
        <TextBox Height="23" Margin="7,0,0,0" Name="TextBox13" VerticalAlignment="Center" Width="80" BorderBrush="#FF9A9C9E" Text="{Binding No}"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource city}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" Margin="7,0,0,0" Name="TextBox11" VerticalAlignment="Center" Width="73" BorderBrush="#FF9A9C9E" Text="{Binding ZipCode}"/>
        <TextBox Height="23" Margin="7,0,0,0" Name="TextBox19" VerticalAlignment="Center" Width="170" BorderBrush="#FF9A9C9E" Text="{Binding City}"/>
    </StackPanel>
    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
        <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Label Content="{DynamicResource country}" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Height="23" Margin="7,0,0,0" Name="TextBox15" VerticalAlignment="Center" Width="250" BorderBrush="#FF9A9C9E" Text="{Binding Country}"/>
    </StackPanel>
</StackPanel>
